You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
448 B
14 lines
448 B
import { delCache } from "#server/utils/context";
|
|
import { deleteExecution } from "#server/service/scheduler";
|
|
|
|
export default defineWrappedResponseHandler(async (event) => {
|
|
const id = getRouterParam(event, "id");
|
|
if (!id) return R.throwError(400, "Missing id", null);
|
|
|
|
const deleted = await deleteExecution(id);
|
|
|
|
await delCache('scheduler:executions:1:20:all:all')
|
|
await delCache('scheduler:stats')
|
|
|
|
return R.success({ deleted });
|
|
});
|